package cn.iune.erp.inventory;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

@Entity
@Table(name="FileStorage",uniqueConstraints={@UniqueConstraint(columnNames={"locationNo", "fParent", "enterpriseNo"})})
@NamedQuery(name="FileStorage.findAll", query="SELECT s FROM FileStorage s")
public class FileStorage {

	@Id
	@Column(length=32)
	private String fID;
	
	@Column(length=32)
	private String systemCode;
	@Column(length=4)
	private String billType;
	@Column(length=20)
	private String billTypeName;
	private Date orderDate;
	@Column(length=10)
	private String state;
	@Column(length=10)
	private String status;

	@Column(length=15)
	String locationNo;
	@Column(length=20)
	String locationName;

	@Column(length=15)
	String storageNo;
	@Column(length=20)
	String storageName;

	@Column(length=256)
	String storageFullID;
	@Column(length=128)
	String storageFullNo;
	@Column(length=128)
	String storageFullName;
	
	
	/////////////////////////////////////////////////////////////////////
	@Column(length=3)
	private String storageType;
	@Column(length=20)
	private String storageTypeLabel;

	@Column(length=32)
	private String factoryID;
	@Column(length=15)
	private String factoryNo;
	@Column(length=20)
	private String factoryName;
	
	@Column(length=5)
	private String allowed;//库存量不足准许出库：yes，否则：no
	private int included = 1;//纳入可用量计算：是的：1，不是：0
	

	///////////////////////////////////////////////////////////////////////////
	
	
	
	private int nodeLevel = 0;
	@Column(length=32)
	private String nodeKind;
	@Column(length=50)
	private String sortNo;
	@Column(length=32)
	private String fParent;

	/*
	@Column(length=20)
	private String contacts;
	@Column(length=20)
	private String mobilePhone;
	@Column(length=20)
	private String fPhone;
	@Column(length=64)
	private String sMail;//电子邮件
	
	///////////////////////////////////////////////
//	@Transient
//	@Column(length=50)
//	private String fRegion;
	@Column(length=50)
	private String fProvince;
	@Column(length=50)
	private String fCity;
	@Column(length=50)
	private String fZone;
	///////////////////////////////////////////////////////
	
	@Column(length=256)
	private String images;//店铺头像
	@Column(length=256)
	private String summary;//店铺简介

	@Transient
	@Column(length=50)
	private String fAddressName;//自提点儿
	@Transient
	@Column(length=255)
	private String fAddress;
	@Transient
	@Column(length=128)
	private String fAddressDetail;//详细地址
	*/

	
	@Column(length=255)
	private String comments;
	
	@Column(length=15)
	private String cUsercode;
	@Column(length=20)
	private String cUsername;//制单人
	private Timestamp cDatetime;
	@Column(length=15)
	private String tUsercode;
	@Column(length=20)
	private String tUsername;//审核人
	private Timestamp tDatetime;
	@Column(length=15)
	private String eUsercode;
	@Column(length=20)
	private String eUsername;//关单人
	private Timestamp eDatetime;
	
	@Column(length=65)
	private String userId;

	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;

	@Version
	private int version = 0;
	
//	private int del = 0;//删除
//	@Column(length=32)
//	private String delUserId;
//	private Timestamp delDatetime;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}


	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}
	
	public String getSystemCode() {
		return systemCode;
	}
	public void setSystemCode(String systemCode) {
		this.systemCode = systemCode;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillTypeName() {
		return billTypeName;
	}
	public void setBillTypeName(String billTypeName) {
		this.billTypeName = billTypeName;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getcUsercode() {
		return cUsercode;
	}
	public void setcUsercode(String cUsercode) {
		this.cUsercode = cUsercode;
	}
	public String getcUsername() {
		return cUsername;
	}
	public void setcUsername(String cUsername) {
		this.cUsername = cUsername;
	}
	public Timestamp getcDatetime() {
		return cDatetime;
	}
	public void setcDatetime(Timestamp cDatetime) {
		this.cDatetime = cDatetime;
	}
	public String gettUsercode() {
		return tUsercode;
	}
	public void settUsercode(String tUsercode) {
		this.tUsercode = tUsercode;
	}
	public String gettUsername() {
		return tUsername;
	}
	public void settUsername(String tUsername) {
		this.tUsername = tUsername;
	}
	public Timestamp gettDatetime() {
		return tDatetime;
	}
	public void settDatetime(Timestamp tDatetime) {
		this.tDatetime = tDatetime;
	}
	public String geteUsercode() {
		return eUsercode;
	}
	public void seteUsercode(String eUsercode) {
		this.eUsercode = eUsercode;
	}
	public String geteUsername() {
		return eUsername;
	}
	public void seteUsername(String eUsername) {
		this.eUsername = eUsername;
	}
	public Timestamp geteDatetime() {
		return eDatetime;
	}
	public void seteDatetime(Timestamp eDatetime) {
		this.eDatetime = eDatetime;
	}
	public String getfID() {
		return fID;
	}
	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getfParent() {
		return fParent;
	}
	public void setfParent(String fParent) {
		this.fParent = fParent;
	}
	public String getStorageNo() {
		return storageNo;
	}
	public void setStorageNo(String storageNo) {
		this.storageNo = storageNo;
	}
	public String getStorageName() {
		return storageName;
	}
	public void setStorageName(String storageName) {
		this.storageName = storageName;
	}
	public String getStorageFullID() {
		return storageFullID;
	}
	public void setStorageFullID(String storageFullID) {
		this.storageFullID = storageFullID;
	}
	public String getStorageFullName() {
		return storageFullName;
	}
	public void setStorageFullName(String storageFullName) {
		this.storageFullName = storageFullName;
	}
	public String getStorageFullNo() {
		return storageFullNo;
	}
	public void setStorageFullNo(String storageFullNo) {
		this.storageFullNo = storageFullNo;
	}
	public int getNodeLevel() {
		return nodeLevel;
	}
	public void setNodeLevel(int nodeLevel) {
		this.nodeLevel = nodeLevel;
	}
	public String getNodeKind() {
		return nodeKind;
	}
	public void setNodeKind(String nodeKind) {
		this.nodeKind = nodeKind;
	}
	public String getSortNo() {
		return sortNo;
	}
	public void setSortNo(String sortNo) {
		this.sortNo = sortNo;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public String getLocationNo() {
		return locationNo;
	}
	public void setLocationNo(String locationNo) {
		this.locationNo = locationNo;
	}
	public String getLocationName() {
		return locationName;
	}
	public void setLocationName(String locationName) {
		this.locationName = locationName;
	}
	public String getStorageType() {
		return storageType;
	}
	public void setStorageType(String storageType) {
		this.storageType = storageType;
	}
	public String getStorageTypeLabel() {
		return storageTypeLabel;
	}
	public void setStorageTypeLabel(String storageTypeLabel) {
		this.storageTypeLabel = storageTypeLabel;
	}
	public String getFactoryID() {
		return factoryID;
	}
	public void setFactoryID(String factoryID) {
		this.factoryID = factoryID;
	}
	public String getFactoryNo() {
		return factoryNo;
	}
	public void setFactoryNo(String factoryNo) {
		this.factoryNo = factoryNo;
	}
	public String getFactoryName() {
		return factoryName;
	}
	public void setFactoryName(String factoryName) {
		this.factoryName = factoryName;
	}
	public int getIncluded() {
		return included;
	}
	public void setIncluded(int included) {
		this.included = included;
	}
	public String getAllowed() {
		return allowed;
	}
	public void setAllowed(String allowed) {
		this.allowed = allowed;
	}



	
}
